<template>
	<view>
		<view class="search">
			<uni-search-bar @confirm="search" @input="input" placeholder="请输入" bgColor="#EFEFF4" :radius="100"></uni-search-bar>
		</view>
		<view class="kong"></view>
		<view class="now">
			<view class="zi">未发布考试</view>
		</view>
		<view v-for="(item,index) in items" :key='item.id' class="now-exam">
			<view><image src='../../../static/kaoshi.png' class="icon"></image></view>
			<view class="exam">{{item.exam}}</view>
			<view class="name">{{item.name}}</view>
			<navigator url="./enter-exam">
				<view><button  class="enter">详情</button></view>
			</navigator> 
		</view>
		<view class="former">
			<view class="zi">已发布考试</view>
		</view>
		<view v-for="(item,index) in bigitems" :key='item.id' class="now-exam">
			<view><image src='../../../static/kaoshi.png' class="icon"></image></view>
			<view class="exam">{{item.exam}}</view>
			<view class="name">{{item.name}}</view>
			<navigator url="./look-exam">
			<view><button class="chehui" @click="del(index)">撤回</button></view>	
			</navigator> 
			<navigator url="./look-exam">
			<view><button class="enter">详情</button></view>	
			</navigator> 
		</view>
		<view class="hui"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items:[
					{
						exam:'高数期末考试',
						name:'管理员',
						id:'0',
						// scr:'../../../static/kaoshi.png'
						
					},
					{
						exam:'英语小测',
						name:'张澄',
						id:'1',
						// scr:'../../../static/kaoshi.png'
					},
					{
						exam:'线代小测',
						name:'高帆',
						id:'2',
						// scr:'../../../static/kaoshi.png'
					},
					
				],
				bigitems:[
					{
						exam:'线代期中考试',
						name:'管理员',
						id:'0',
						scr:'../../../static/kaoshi.png'
					},
					{
						exam:'物理小测',
						name:'王柯',
						id:'1',
						// scr:'../../../static/kaoshi.png'
					},
					{
						exam:'线代期中考试',
						name:'李萌',
						id:'0',
						scr:'../../../static/kaoshi.png'
					},
					
				]
				
				
			}
		},
		methods: {
			 del(a){
			    this.bigitems.splice(a,1)
			        }
		}
	}
</script>

<style >
	.search{
		border-radius: 37rpx;
	}
	.kong {
		height: 60rpx;
		width: 100%;
		background-color: #FFFFFF;
	}
	.now{
		height: 80rpx;
		width: 100%;
		background-color:#EFEFF4;
		display: flex;
		flex-direction: column;
		justify-content: center;
		
	}
	.zi{
		height: 50%;
		width: 200rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
	}
	.former{
		height: 80rpx;
		width: 100%;
		background-color:#EFEFF4;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.now-exam{
		height: 130rpx;
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: center;
		border: 2rpx #bbbbbb solid;
	}
	.icon{
		height: 60rpx;
		width: 60rpx;
	}
	button{
		background-color: #12754F;
		color: #FFFFFF;
		font-size: small;
	}
	.hui{
		width: 100%;
		height:43vh;
		background-color: #EFEFF4;
	}
	.chehui{	
			background-color: #cb0000;
			border-radius: 25rpx;
	}
	
</style>
